package com.jmb.apiplatform.service;

import com.jmb.apiplatform.common.PageResult;
import com.jmb.apiplatform.exception.BusinessException;
import com.jmb.apiplatform.exception.ValidException;
import com.jmb.apiplatform.pojo.*;
import org.springframework.transaction.annotation.Transactional;

public interface ApiTestCaseService {
    ApiTestCaseInfoVO findApiTestByCaseId(Integer preCaseId) throws ValidException;
    ApiTestCase saveApiTestCase(ApiTestCase apiTestCase) throws ValidException;
    @Transactional(rollbackFor = ValidException.class)
    void saveApiTestCaseInfo(ApiTestCaseTO apiTestCaseTO) throws ValidException;
    // 返回列表全部数据信息
    PageResult<ApiTestCaseListVO> findApiTestCaseList(ApiTestCaseListTO apiTestCaseListTO) throws ValidException;
    // 查询接口详情
    ApiTestCaseInfoVO editApiTestCaseId(Integer caseId) throws ValidException;
    // 编辑接口
    @Transactional(rollbackFor = ValidException.class)
    void editApiTestCase(ApiTestCaseTO apiTestCaseTO) throws ValidException;
    ApiTestCaseInfoVO findInterfaceCaseByCaseId(Integer caseId);
    // 删除测试用例
    @Transactional(rollbackFor = ValidException.class)
     void removeApiTestCase(Integer id) throws ValidException;

    Integer executeInterfaceCase(ExecuteInterfaceCaseParam executeInterfaceCaseParam) throws ValidException, BusinessException;
}
